<!DOCTYPE html>
<html>
<#include "../head.html">
    <body class="full">
    <div class="mc">
        <div>
            <div class="mc-l">
                <!--左侧导航---{-->
                <div id="navPanelContainer">
                    <div class="system-logo cd"></div>
                    <!--管理员信息---{-->
                    <#include "../adminInfo.html">
                        <!--管理员信息---}-->
                        <div class="nav-wrap">
                            <#include "left.html">
                        </div>
                </div>
                <!--左侧导航---}-->
            </div>
            <div class="mc-m">
                <div class="navToggle"></div>
            </div>
            <div class="mc-r">
                <!--顶部导航---{-->
                <#include "../topNav.html">
                    <!--顶部导航---}-->

                    <!--面包屑导航---{-->
                    <#assign moduleName="新增投资用户">
                        <#include "banner.html">
                            <!--面包屑导航---}-->

                            <!--工具栏--{-->
                            <div id="toolbar" class="clearfix">
                                <div class="s_toolTop">
                                    <div class="toolbor-module export">
                                        <input type="button" onclick="exportxls()" value="导出列表" class="input-button export-btn"/>
                                    </div>
                                    <div class="toolbor-module export">
                                        &nbsp;&nbsp;&nbsp;投资总额：${money?c}
                                    </div>
                                </div>
                                <div class="s_toolTop">
                                    <div class="toolbor-module export">
                                        <div class="formTit">注册时间：</div>
                                        <input class="_search-value" name="regStartDate" id="regStartDate" value="" onclick="change_picktime()"/>
                                        <div class="formTit"> 到 </div>
                                        <input class="_search-value" name="regEndDate" id="regEndDate" value=""  onclick="change_picktime()"/>
                                    </div>
                                    <div class="toolbor-module export">
                                        <div class="formTit">注册来源：</div>
                                        <div class="select-box" id="sourceType">
                                            <div class="tag-select">全部</div>
                                            <ul class="tag-options">
                                                <li data-value="">全  部</li>
                                                <li data-value="0">PC</li>
                                                <li data-value="1">APP</li>
                                                <li data-value="23">IOS</li>
                                                <li data-value="24">安卓</li>
                                            </ul>
                                        </div>
                                    </div>
                                    <div class="toolbor-module export">
                                        <div class="formTit">渠道来源：</div>
                                        <div class="select-box" id="channelSource">
                                            <div class="tag-select"> <#if channelSource??&&channelSource?length gt 0>${channelSource} <#else>全部</#if></div>
                                            <ul class="tag-options" style="width:600px;right:-1px;left:auto;">
                                                <li data-value="" style="float:left">全  部</li>
                                                <#if sourceList??>
                                                    <#list sourceList as item>
                                                        <li data-value="${item.name!''}" style="float:left">${item.name!''}</li>
                                                    </#list>
                                                </#if>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                                <div class="s_toolTop">
                                    <div class="toolbor-module export">
                                        <div class="formTit">投资时间：</div>
                                        <input class="_search-value" name="startDate" id="startDate" value="" onclick="change_picktime()"/>
                                        <div class="formTit"> 到 </div>
                                        <input class="_search-value" name="endDate" id="endDate" value=""  onclick="change_picktime()"/>
                                    </div>
                                    <div class="toolbor-module export">
                                        <div class="formTit">用户名：</div>
                                        <input type="text" name="username" id="username" value="请输入用户名" class="search-value">
                                        <div class="formTit">真实姓名：</div>
                                        <input type="text" name="realname" id="realname" value="请输入真实姓名" class="search-value">
                                    </div>
                                </div>
                                <div class="s_toolTop">
                                    <div class="toolbor-module search">
                                        <input type="button" value="搜索"  class="input-button" onclick="sousuo();">
                                    </div>
                                </div>
                            </div>
                            <!--工具栏--}-->

                            <div id="main" class="clearfix">
                                    <table class="data-list">
                                        <tr class="header">
                                            <td>用户名</td>
                                            <td>真实姓名</td>
                                            <td>第一次投资时间</td>
                                            <td>投资金额</td>
                                            <td>投资天数</td>
                                            <td>准备金余额</td>
                                            <td>渠道来源</td>
                                            <td>注册来源</td>
                                            <td>注册时间</td>
                                        </tr>
                                        <#if list?? && (list?size) gt 0 >
                                        	<#list list as item>
                                            <tr class="s">
                                                <td>${item.userName!''}</td>
                                                <td>${item.realName!''}</td>
                                                <td>${item.tenderDate!''}</td>
                                                <td>${(item.tenderMoney?c)!0}元</td>
                                                <td>${item.timeLimitDay!''}</td>
                                                <td>${(item.useMoney)!0}元</td>
                                                <td><#if item.channelSource??&&item.channelSource!='null'>${item.channelSource!''}<#else>-</#if></td>
                                                <td>
                                                 <#if item.sourceFrom=='23'>
                                                	IOS
	                                            <#elseif item.sourceFrom=='24'>
	                                            	安卓
	                                             <#elseif item.sourceFrom=='1'>
	                                             	APP
	                                             <#else>
	                                             	PC
                                                </#if>
                                                </td>
                                                <td>${item.registerDate!''}</td>
                                            </tr>
                                        	</#list>
                                         </#if>
                                    </table>
                                <input id="channelSource2" value="${channelSource}" type="hidden"> 
                                <!--底部工具栏--{-->
                                <div id="bottomToolbar" class="clearfix">
                                    <div class="other-tool">
                                        <dl class="refresh-data">
                                            <dt class="refresh-data-icon"></dt>
                                            <dd><a href="javascript:void(0);" class="refresh-page">刷新数据</a></dd>
                                        </dl>
                                    </div>

                                    <!--翻页系统--{-->
                                    <div class="container s_formPage">
                                        <#import "../../common/page.html" as pager>
                                            <@pager.pagination page=page url="${pageUrl}" map=param style="style1" />
                                    </div>
                                    <!--翻页系统--}-->
                                </div>
                                <!--底部工具栏--}-->

                                <script>
                                    var url = 'firstTenderUser.html?search=true';
                                    var xurl = 'firstTenderUser.html?type=export';
                                    function sousuo(){
                                        var sou = "";
                                        var username = $("#username").val();
                                        if (username!=null&&username!=""&&username!="undefine"&&username!="请输入用户名"){
                                            sou += "&username="+username;
                                        }
                                    	var realname = $("#realname").val();
                    					if(realname!=""&&realname!="请输入真实姓名"){
                    						sou += "&realname="+realname;
                    					}
                   					  	var startDate = $("#startDate").val();
                                        	var endDate = $("#endDate").val();
                                         if (startDate!=null){
                                             sou += "&startDate="+startDate;
                                         }
                                         if (endDate!=null){
                                             sou += "&endDate="+endDate;
                                         }
                                         var sourceType = $("#sourceType").find(".open-selected").attr("data-value");
                                         if(sourceType!=null&&sourceType!=""&&sourceType!="undefine"){
                                         	sou += "&sourceType="+sourceType;
                                         }
                                         
                                         var channelSource = $("#channelSource").find(".open-selected").attr("data-value");
                                         if(channelSource!=null&&channelSource!=""&&channelSource!="undefine"){
                                         	sou += "&channelSource="+channelSource;
                                         }
                                         
                                         var regStartDate = $("#regStartDate").val();
                                     	 var regEndDate = $("#regEndDate").val();
	                                     if (regStartDate!=null){
	                                          sou += "&regStartDate="+regStartDate;
	                                     }
	                                     if (regEndDate!=null){
	                                          sou += "&regEndDate="+regEndDate;
	                                     }
	                                     if (sou!=""){
	                                            location.href=url+sou;
	                                     }
                                    }
                                    function exportxls(){
                                        time();
                                        var sou = "";
                                        var username = $("#username").val();
                                        if (username!=null&&username!=""&&username!="undefine"&&username!="请输入用户名"){
                                            sou += "&username="+username;
                                        }
                                        var realname = $("#realname").val();
                                        if(realname!=""&&realname!="请输入真实姓名"){
                                            sou += "&realname="+realname;
                                        }
                                        var startDate = $("#startDate").val();
                                            var endDate = $("#endDate").val();
                                         if (startDate!=null){
                                             sou += "&startDate="+startDate;
                                         }
                                         if (endDate!=null){
                                             sou += "&endDate="+endDate;
                                         }
                                         var sourceType = $("#sourceType").find(".open-selected").attr("data-value");
                                         if(sourceType!=null&&sourceType!=""&&sourceType!="undefine"){
                                            sou += "&sourceType="+sourceType;
                                         }
                                         
                                         var channelSource = $("#channelSource").find(".open-selected").attr("data-value");                                        
                                         if(channelSource!=null&&channelSource!=""&&channelSource!="undefine"){
                                            sou += "&channelSource="+channelSource;
                                         }else if($("#channelSource2").val()!=""){
                                        	 sou += "&channelSource="+$("#channelSource2").val();
                                         }
                                         
                                         var regStartDate = $("#regStartDate").val();
                                         var regEndDate = $("#regEndDate").val();
                                         if (regStartDate!=null){
                                              sou += "&regStartDate="+regStartDate;
                                         }
                                         if (regEndDate!=null){
                                              sou += "&regEndDate="+regEndDate;
                                         }
                                         if (sou!=""){
                                                location.href=xurl+sou;
                                         }
                                    }
                              //秒倒计时
                                        var tmpWait = 10;                    
                                        function time() {
                                            if (tmpWait>0) {
                                                $('.export input').attr("disabled", true);
                                                $('.export input').val(tmpWait + "秒后再试");
                                                --tmpWait;
                                                setTimeout(function() {
                                                        time();
                                                    },
                                                    1000)
                                            } else {
                                                tmpWait = 10;
                                                $('.export input').removeAttr("disabled");
                                                $('.export input').val("导出列表");
                                            }
                                        }
                                </script>
                            </div>

            </div>
        </div>
        <div class="mc-b">
            <#include "../foot.html">
        </div>
    </div>
    <#include "../jsPage.html">
    </body>
</html>

